    \begin{tikzpicture}
        \draw[thick] (0,2) -- (2,2);
        \node at (0.2,1.8) {$A$};
        \node at (1.0,1.8) {$B$};
        \node at (1.8,1.8) {$F$};
        \draw[thick] (0,1.6) -- (2,1.6);
        \node at (0.2,1.4) {$0$};
        \node at (1.0,1.4) {$0$};
        \node at (1.8,1.4) {$m_0$};
        \node at (0.2,1.0) {$0$};
        \node at (1.0,1.0) {$1$};
        \node at (1.8,1.0) {$m_1$};
        \node at (0.2,0.6) {$1$};
        \node at (1.0,0.6) {$0$};
        \node at (1.8,0.6) {$m_2$};
        \node at (0.2,0.2) {$1$};
        \node at (1.0,0.2) {$1$};
        \node at (1.8,0.2) {$m_3$};
        \draw[thick] (0,0) -- (2,0);
    \end{tikzpicture}
    \qquad\qquad
    \begin{tikzpicture}
        \draw[gray] (0,0) grid (2,2);
        \node[left] at (0,0.5) {$B$};
        \node[left] at (0,1.5) {$B'$};
        \node[above] at (0.5,2) {$A'$};
        \node[above] at (1.5,2) {$A$};
        \node at (0.5,0.5) {$A'B$};
        \node at (1.5,0.5) {$AB$};
        \node at (0.5,1.5) {$A'B'$};
        \node at (1.5,1.5) {$AB'$};
    \end{tikzpicture}
    \qquad\qquad
    \begin{tikzpicture}
        \draw[gray] (0,0) grid (2,2);
        \draw[gray] (-0.5,2.5) -- (0,2);
        \node[above,blue] at (0,2) {$A$};
        \node[left,blue] at  (0,2) {$B$};
        \node[left] at (0,0.5) {$1$};
        \node[left] at (0,1.5) {$0$};
        \node[above] at (0.5,2) {$0$};
        \node[above] at (1.5,2) {$1$};
        \node at (0.5,0.5) {$m_1$};
        \node at (1.5,0.5) {$m_3$};
        \node at (0.5,1.5) {$m_0$};
        \node at (1.5,1.5) {$m_2$};
    \end{tikzpicture}
